package com.wms.project.business.customer.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wms.project.business.customer.mapper.CustomerMapper;
import com.wms.project.business.customer.domain.Customer;
import com.wms.project.business.customer.service.ICustomerService;
import com.wms.common.utils.text.Convert;

/**
 * 企业客户 服务层实现
 * 
 * @author zhangp
 * @date 2019-07-26
 */
@Service
public class CustomerServiceImpl implements ICustomerService 
{
	@Autowired
	private CustomerMapper customerMapper;

	/**
     * 查询企业客户信息
     * 
     * @param id 企业客户ID
     * @return 企业客户信息
     */
    @Override
	public Customer selectCustomerById(Long id)
	{
	    return customerMapper.selectCustomerById(id);
	}
	
	/**
     * 查询企业客户列表
     * 
     * @param customer 企业客户信息
     * @return 企业客户集合
     */
	@Override
	public List<Customer> selectCustomerList(Customer customer)
	{
	    return customerMapper.selectCustomerList(customer);
	}
	
    /**
     * 新增企业客户
     * 
     * @param customer 企业客户信息
     * @return 结果
     */
	@Override
	public int insertCustomer(Customer customer)
	{
	    return customerMapper.insertCustomer(customer);
	}
	
	/**
     * 修改企业客户
     * 
     * @param customer 企业客户信息
     * @return 结果
     */
	@Override
	public int updateCustomer(Customer customer)
	{
	    return customerMapper.updateCustomer(customer);
	}

	/**
     * 删除企业客户对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCustomerByIds(String ids)
	{
		return customerMapper.deleteCustomerByIds(Convert.toStrArray(ids));
	}
	
}
